package com.itheima.movies.controller;

import com.itheima.movies.domain.Movies;
import com.itheima.movies.service.MoviesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;
@Controller
@RequestMapping("/movies")

public class MoviesController {
    @Autowired
    private MoviesService moviesService;
    @ResponseBody
    @RequestMapping("/findAll")
    public List<Movies> findAll(){
        return moviesService.findAll();
    }
	
	    @ResponseBody
    @RequestMapping("/findAll111")
    public List<Movies> findAll222(){
        return moviesService.findAll();
    }
}
